package main

import (
	"fmt"
	"log"
	"net/http"
)

// 自定义多路复用器
func main() {
	mux := http.NewServeMux()
	mux.HandleFunc("/", hi)
	server := &http.Server{
		Addr: ":80",
		Handler: mux,
	}
	if err := server.ListenAndServe(); err != nil {
		log.Fatal(err)
	}
}

func hi(w http.ResponseWriter, req *http.Request) {
	fmt.Fprintf(w, "hi ,this is a web view!")
}